import os
import requests
import json
from abc import ABC, abstractmethod
from typing import Dict, Any, List, Optional
import base64
from io import BytesIO

class AIConfig:
    """AI模型配置管理"""
    def __init__(self):
        self.configs = {
            "openai": {
                "api_key": os.getenv("OPENAI_API_KEY"),
                "base_url": "https://api.openai.com/v1"
            },
            "stability": {
                "api_key": os.getenv("STABILITY_API_KEY"),
                "base_url": "https://api.stability.ai"
            },
            "elevenlabs": {
                "api_key": os.getenv("ELEVENLABS_API_KEY"),
                "base_url": "https://api.elevenlabs.io/v1"
            }
        }